<?php /* Smarty version Smarty-3.1.12, created on 2013-04-12 12:33:11
         compiled from "C:\wamp\www\cm\templates\cash\list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:223115167ff0761fe07-81430749%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4b8e9f62b3d826bba73a37b70fec011d29490a21' => 
    array (
      0 => 'C:\\wamp\\www\\cm\\templates\\cash\\list.tpl',
      1 => 1365767107,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '223115167ff0761fe07-81430749',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'data' => 0,
    'filter' => 0,
    'value' => 0,
    'counter' => 0,
    'bgClass' => 0,
    'cash' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_5167ff0795b106_23806564',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5167ff0795b106_23806564')) {function content_5167ff0795b106_23806564($_smarty_tpl) {?><script type="text/javascript">
    
        $(document).ready(function() {
            $("#fulltext").keyup(function(event){
                if(event.keyCode == 13){
                    setFulltext($('#fulltext').val(),'cash_fulltext')
                }
            });
        });
    
</script>
<h2 class="pageTitle">State of cash</h2>
<?php echo $_smarty_tpl->getSubTemplate ($_smarty_tpl->tpl_vars['data']->value['pathToError'], $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<div class="menu-list">
    Fulltext search: <input id="fulltext" type="text" value="<?php if ($_smarty_tpl->tpl_vars['data']->value['currentFulltext']!=''){?><?php echo $_smarty_tpl->tpl_vars['data']->value['currentFulltext'];?>
<?php }?>" /><input value="Search" type="button" onclick="setFulltext($('#fulltext').val(),'cash_fulltext')" />
</div>
<?php if ($_smarty_tpl->tpl_vars['data']->value['currentFilter']||$_smarty_tpl->tpl_vars['data']->value['currentFulltext']!=''){?>
    <div class="menu-list bgDark">
        <b>Current filter:</b> 
        <ul>
            <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['filter'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['currentFilter']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['filter']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
                <li><?php echo $_smarty_tpl->tpl_vars['filter']->value;?>
 = <i><?php echo $_smarty_tpl->tpl_vars['value']->value;?>
</i> [<a href="javascript: cancelFilter('<?php echo $_smarty_tpl->tpl_vars['filter']->value;?>
','cash_filter')" class="baseLink">Cancel</a>]</li>
            <?php } ?>
            <?php if ($_smarty_tpl->tpl_vars['data']->value['currentFulltext']!=''){?>
                <li>Fulltext = <i><?php echo $_smarty_tpl->tpl_vars['data']->value['currentFulltext'];?>
</i> [<a href="javascript: cancelFulltext('cash_fulltext')" class="baseLink">Cancel</a>]</li>
            <?php }?>
        </ul>
    </div>
<?php }?>
<table class="list">
    <tr>
        <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_ADMIN){?>
            <td colspan="10" style="text-align: right">
        <?php }else{ ?>
            <td colspan="7" style="text-align: right">
        <?php }?>
            <b>My current status:</b> <?php echo $_smarty_tpl->tpl_vars['data']->value['myTotal'];?>
&nbsp;
        </td>
    </tr>
    <tr>
        <th><a href="javascript: order('created','cash_order')">Created <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="created"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <th><a href="javascript: order('who_added','cash_order')">Who added <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="who_added"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <th>
            <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_TECHNIC){?>
                User
            <?php }else{ ?>
                <a href="javascript: order('user','cash_order')">User <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="user"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a>
            <?php }?>
        </th>
        <th><a href="javascript: order('date','cash_order')">Date of move <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="date"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <th><a href="javascript: order('amount','cash_order')">Amount <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="amount"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <th><a href="javascript: order('type_of_move','cash_order')">Type of move <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="type_of_move"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <th><a href="javascript: order('description','cash_order')">Description <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="description"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
        <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_ADMIN){?>
            <th><a href="javascript: order('s','cash_order')">S <?php if ($_smarty_tpl->tpl_vars['data']->value['currentOrder'][0]=="s"){?><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/<?php echo $_smarty_tpl->tpl_vars['data']->value['currentOrder'][1];?>
.png" height="14" width="14" /><?php }?></a></th>
            <th></th>
            <th></th>
        <?php }?>
    </tr>
    <?php $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(1, null, 0);?>
    <?php  $_smarty_tpl->tpl_vars['cash'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cash']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['cashes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cash']->key => $_smarty_tpl->tpl_vars['cash']->value){
$_smarty_tpl->tpl_vars['cash']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['cash']->key;
?>
        <?php if ($_smarty_tpl->tpl_vars['counter']->value==1){?>
            <?php $_smarty_tpl->tpl_vars['bgClass'] = new Smarty_variable('bgDark', null, 0);?>
        <?php }else{ ?>
            <?php $_smarty_tpl->tpl_vars['bgClass'] = new Smarty_variable('bgLight', null, 0);?>
        <?php }?>
        <tr class="<?php echo $_smarty_tpl->tpl_vars['bgClass']->value;?>
">
            <?php if ($_smarty_tpl->tpl_vars['counter']->value==1){?>
                <?php $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(2, null, 0);?>
            <?php }else{ ?>
                <?php $_smarty_tpl->tpl_vars['counter'] = new Smarty_variable(1, null, 0);?>
            <?php }?>
            <td><a class="filterLink" href="javascript: filter('created','<?php echo $_smarty_tpl->tpl_vars['cash']->value['created'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['created_format'];?>
</a></td>
            <td><a class="filterLink" href="javascript: filter('who_added','<?php echo $_smarty_tpl->tpl_vars['cash']->value['who_added'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['creator_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['cash']->value['creator_info']['surname'];?>
</a></td>
            <td>
                <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_TECHNIC){?>
                    <?php echo $_smarty_tpl->tpl_vars['cash']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['cash']->value['user_info']['surname'];?>

                <?php }else{ ?>
                    <a class="filterLink" href="javascript: filter('user','<?php echo $_smarty_tpl->tpl_vars['cash']->value['user'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['cash']->value['user_info']['surname'];?>
</a>
                <?php }?>
            </td>
            <td><a class="filterLink" href="javascript: filter('date','<?php echo $_smarty_tpl->tpl_vars['cash']->value['date'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['d_format'];?>
</a></td>
            <td><a class="filterLink" href="javascript: filter('amount','<?php echo $_smarty_tpl->tpl_vars['cash']->value['amount'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['amount'];?>
</a></td>
            <td><a class="filterLink" href="javascript: filter('type_of_move','<?php echo $_smarty_tpl->tpl_vars['cash']->value['type_of_move'];?>
','cash_filter')"><?php echo $_smarty_tpl->tpl_vars['cash']->value['type_format']['TypPohybu'];?>
</a></td>
            <td><?php echo $_smarty_tpl->tpl_vars['cash']->value['description'];?>
</td>
            <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_ADMIN){?>
                <td>
                    <a class="filterLink" href="javascript: filter('s','<?php echo $_smarty_tpl->tpl_vars['cash']->value['s'];?>
','cash_filter')"><?php if ($_smarty_tpl->tpl_vars['cash']->value['s']==1){?>Yes<?php }else{ ?>No<?php }?></a>
                </td>
                <td><a class="filterLink" href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=edit_entry&entry=<?php echo $_smarty_tpl->tpl_vars['cash']->value['Id'];?>
"><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/edit.png" height="16" width="16" /></a></td>
                <td><a class="filterLink" href="javascript: void(0)" onclick="deleteEntry(<?php echo $_smarty_tpl->tpl_vars['cash']->value['Id'];?>
)"><img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/delete.png" height="16" width="16" /></a></td>
            <?php }?>
        </tr>
    <?php } ?>
    <tr>
        <th></th>
        <th></th>
        <th></th>
        <th>Total:</th>
        <th><?php echo $_smarty_tpl->tpl_vars['data']->value['sum'];?>
</th>
        <th></th>
        <th></th>
        <?php if ($_SESSION['user']['profile']['userlevel']==@USER_TYPE_ADMIN){?>
            <th></th>
            <th></th>
            <th></th>
        <?php }?>
    </tr>
</table>
<div class="menu-list">
    <span class="pager"><?php echo $_smarty_tpl->tpl_vars['data']->value['pager'];?>
</span>
    Records per page
    <select class="pager" size="1" onchange="changeRecordsPerPage(this.value, 'cash_pager')">
        <option <?php if ($_SESSION['cash_pager']==100){?>selected="selected"<?php }?> value="100">100</option>
        <option <?php if ($_SESSION['cash_pager']==500){?>selected="selected"<?php }?> value="500">500</option>
        <option <?php if ($_SESSION['cash_pager']==1000){?>selected="selected"<?php }?> value="1000">1000</option>
        <option <?php if ($_SESSION['cash_pager']==10000000){?>selected="selected"<?php }?> value="10000000">All</option>
    </select>
</div><?php }} ?>